<?php slot('sub', $sub); ?>

<div class="center">
    <div id="center_conteiner" class="clearfix">
        <div class="center_sub_conteiner">

            <div class="center_block">
                <div class="header_center_block">
                    <span>Edit Region</span>
                    <div class="back_button"><a href="<?php echo url_for('aregion'); ?>">Back</a></div>
                </div>

                <div class="center_line" id="edit_region_id">
                    <div class="field_label">Region ID</div>
                    <input type="text" class="field_input" value="<?php echo $region->getId(); ?>" readonly>
                </div>

                <div class="center_line" id="edit_region_country">
                    <div class="field_label">Country</div>
                    <select class="field_select">
                        <?php
                        foreach ($country as $c) {
                            if ($c->getId() == $region->getCountryId()) {
                                echo "<option selected='selected' value='" . $c->getId() . "'>" . $c->getNameEn() . "</option>";
                            } else {
                                echo "<option value='" . $c->getId() . "'>" . $c->getNameEn() . "</option>";
                            }
                        }
                        ?>
                    </select>
                </div>

                <div class="center_line" id="edit_region_en">
                    <div class="field_label">Name in English</div>
                    <input type="text" class="field_input" value="<?php echo $region->getNameEn(); ?>">
                </div>

                <div class="center_line"  id="edit_region_ru">
                    <div class="field_label">Name in Russian</div>
                    <input type="text" class="field_input" value="<?php echo $region->getNameRu(); ?>">
                </div>

                <div class="center_line" id="edit_region_he">
                    <div class="field_label">Name in Hebrew</div>
                    <input type="text" class="field_input" value="<?php echo $region->getNameHe(); ?>">
                </div>

                <div class="center_line">
                    <div class="field_button_positive" id="edit_region_save">Save</div>
                    <div class="field_button_negative" id="edit_region_cancel"><a href="<?php echo url_for('aregion'); ?>">Cancel</a></div>
                </div>

            </div>
        </div>
    </div>
</div>